package com.balusoft.shared.domain;

import javax.persistence.Embedded;
import javax.persistence.Id;

import com.googlecode.objectify.annotation.Entity;

@Entity
public class Person  {
	@Id Long id;	
	@Embedded public Name name;	
	String title;
	
	public Person(){}
	
	public Name getName() {
		return name;
	}

	public void setName(Name name) {
		this.name = name;
	}

	public Person(Name name) {
		super();
		this.name = name;
		this.title = name.getTitle();
	}

	public Person(String firstName, String lastName, String middleName) {
		super();
		this.name = new Name(firstName, lastName, middleName);
		this.title = name.getTitle();
	}

	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
}
